package com.atguigu.gulimall.auth.service;

import com.atguigu.common.utils.R;
import com.atguigu.common.vo.SocialUser;
import com.atguigu.gulimall.auth.vo.UserLoginVo;
import com.atguigu.gulimall.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @version 1.0
 * @Author yanjingren
 * @Date 2021/6/8
 * @Description com.atguigu.gulimall.auth.service
 */
@FeignClient(name = "gulimall-member")
public interface UserFeignService {
    @PostMapping("/member/user/register")
    R register(@RequestBody UserRegisterVo userRegisterVo);

    @PostMapping("/member/user/login")
    R login(@RequestBody UserLoginVo userLoginVo);

    @PostMapping("/member/user/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;
}
